<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <js file="__PUBLIC__/Js/jquery-1.8.2.min.js"/>
    <js file="__PUBLIC__/Js/ghulam.js"/>
    <style>
        .app{
            width:94%;
            height:auto;
            overflow:hidden;
            margin:20px auto;
            padding:10px 20px;
            border:#ccc solid 1px;
        }
        .app dl{
            margin:10px 0;
            border:#ccc solid 1px;
            height:auto;
            overflow:hidden;
        }
        .app dl dt{
            display:blick;
            height:36px;
            line-height:36px;
            background:#e6e6e6;
            text-index:10px;
            padding:0 10px;
        }
        .app dl dd{
            float:left;
            margin:0 10px;
            padding:10px 15px;
        }

    </style>
</head>
<body >
<div class="container-fluid" >
    <div class="row">
        <div class="col-sm-9  " style="width: 100%">
            <h3 class="sub-header">节点列表</h3>
            <div class="table-responsive">
                <a href="{:U(GROUP_NAME.'/Rbac/addNode')}" class="btn btn-primary">添加应用</a>
                <foreach name="node" item="app">
                    <div class="app">
                        <p>{$app.title} <a href="{:U(GROUP_NAME.'/Rbac/addNode', array('pid' => $app['id'], 'level' => 2))}" class="btn btn-info btn-xs">添加控制器</a>
                            <a onclick="return del()" href="{:U(GROUP_NAME.'/Rbac/deletenode', array('id' => $app['id']))}" class="btn btn-danger btn-xs">删除</a>
                        </p>

                        <foreach name="app.child" item="action">
                            <dl>
                                <dt style="color:#f00;">
                                    {$action.title}
                                    <a href="{:U(GROUP_NAME.'/Rbac/addNode', array('pid' => $action['id'], 'level' => 3))}" class="btn btn-info btn-xs">添加方法</a>
                                    <a onclick="return del()" href="{:U(GROUP_NAME.'/Rbac/deletenode', array('id' => $action['id']))}" class="btn btn-danger btn-xs">删除</a>
                                </dt>
                                <foreach name="action.child" item="method">
                                    <dd>
                                        <span>{$method.title}</span>
                                        <a onclick="return del()"  href="{:U(GROUP_NAME.'/Rbac/deletenode', array('id' => $method['id']))}" class="btn btn-danger btn-xs">删除</a>
                                    </dd>
                                </foreach>
                            </dl>

                        </foreach>
                    </div>
                </foreach>
            </div>
        </div>
    </div>
</div>
<link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/bootstrap/css/button.css" rel="stylesheet">
<script src="__PUBLIC__/bootstrap/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/bootstrap/js/bootstrap.js"></script>
</body>
</html>